module.exports = {
  assetsDir: 'answer',
  publicPath: process.env.NODE_ENV === 'production' ?
    'https://cdn.hterobot.com/vue/' : '/',
  pages: {
    answer: {
      entry: 'src/answer/main.js',
      template: 'public/answer.html',
      filename: 'answer.html',
    },
    library: {
      entry: 'src/library/main.js',
      template: 'public/library.html',
      filename: 'library.html',
    },
    codingrobot: {
      entry: 'src/codingrobot/main.js',
      template: 'public/codingrobot.html',
      filename: 'codingrobot.html',
    },
    micro: {
      entry: 'src/micro/main.js',
      template: 'public/micro.html',
      filename: 'micro.html',
    },
    studentbind: {
      entry: 'src/studentbind/main.js',
      template: 'public/studentbind.html',
      filename: 'studentbind.html',
    },
  },
  devServer: {
    proxy: {
      '/': {
        target: 'http://127.0.0.1:7001',
        // target: 'http://www.hterobot.com/',
        // target: 'http://localhost:7001/',
        // target: 'http://node.hterobot.com/',
        // 如果要代理 websockets
        ws: false,
        // 将主机标头的原点更改为目标URL
        changeOrigin: true
      }
    }
  },
}
